<template>
	<div id="app">
		<keep-alive>
			<!-- 需要缓存的视图组件 -->
			<router-view v-if="$route.meta.keepAlive && user"></router-view>
		</keep-alive>
		<!-- 不需要缓存的视图组件 -->
		<router-view v-if="!$route.meta.keepAlive && user"></router-view>
	</div>
</template>

<script>
import { mapState, mapActions } from "vuex";
export default {
	name: "Order",
	data() {
		return {};
	},
	async created() {
		await this.queryLoginUserInfo();
		
	},
	computed: {
		...mapState("user", ["user"]),
	},

	methods: {
		...mapActions("user", ["queryLoginUserInfo","processLoginUserInfo"]),
	},
};
</script>

<style>
#app {
	padding: 0 0.12rem;
	box-sizing: border-box;
}
</style>
